import request from "@/utils/request";

// 查询列表
export function listApproveProcess(query) {
  return request({
    url: "/system/approveProcess/list",
    method: "get",
    params: query,
  });
}
//项目类型列表
export function projectTypeList() {
  return request({
    url: "/system/approveProcess/projectTypeList",
    method: "get",
  });
}
// 添加审批
export function addApprove(data) {
  return request({
    url: "/system/approveProcess",
    method: "post",
    data,
  });
}
//更改状态
export function changeStatus(data) {
  return request({
    url: "/system/approveProcess/changeStatus",
    method: "put",
    data,
  });
}
//查询审批
export function queryAddprove(id) {
  return request({
    url: "/system/approveProcess/" + id,
    method: "get",
  });
}
// 编辑审批
export function editAddprove(data) {
  return request({
    url: "/system/approveProcess",
    method: "put",
    data,
  });
}
//删除
export function deleteAddprove(id) {
  return request({
    url: "/system/approveProcess/" + id,
    method: "delete",
  });
}
// 获取后台所有管理员用户
export function getAdminList() {
  return request({
    url: "/system/user/allList",
    method: "get",
  });
}
//获取后台所有的角色
export function getActorList() {
  return request({
    url: "/system/role/allList",
    method: "get",
  });
}
// 添加流程设计
export function addStep(data) {
  return request({
    url: "/system/approveProcess/addStep",
    method: "post",
    data,
  });
}
//获取全部岗位
export function getPostList() {
  return request({
    url: "/system/post/listAll",
    method: "get",
  });
}
